function yuv_out = vector_overlay(yuv_in, mask, k, alpha)
pic_dim  = size(yuv_in);
y_mask   = imresize(double(mask), pic_dim(1:2))*k;
y_mask(y_mask>255) = 255;
y_mask(y_mask<0)   = 0;
yuv_out  = double(yuv_in);
yuv_out(:,:,1) = double(yuv_in(:,:,1))*(1-alpha) + y_mask*alpha;
yuv_out(yuv_out>255) = 255;
yuv_out(yuv_out<0) = 0;
yuv_out  = uint8(yuv_out);

